package controllers;

import java.awt.event.ActionEvent;

import models.DailySalesModel;
import system.View;

public class ManagerMenuController extends AbstractMenuController
{
	SupplierController supplier_controller;
	ProcessDeliveryController process_delivery;
	DailySalesController daily_sales_controller;
	ProcessShipmentController process_shipment;
	TopSellingItemsController top_selling_controller;
	
	public ManagerMenuController(View v)
	{
		super(v);
		supplier_controller = new SupplierController(v);
		process_delivery = new ProcessDeliveryController(v);
		daily_sales_controller = new DailySalesController(v);
		process_shipment = new ProcessShipmentController(v);
		top_selling_controller = new TopSellingItemsController(v);
	}

	@Override
	public void actionPerformed(ActionEvent e) 
	{
		String actionCommand = e.getActionCommand();
		
		if (actionCommand.equals("Insert Supplier"))
		    supplier_controller.actionPerformed(e);
		else if(actionCommand.equals("Delete Supplier"))
			supplier_controller.actionPerformed(e);
		else if(actionCommand.equals("Process Delivery"))
			process_delivery.actionPerformed(e);
		else if(actionCommand.equals("Daily Sales Report"))
			daily_sales_controller.actionPerformed(e);
		else if(actionCommand.equals("Process Shipment"))
			process_shipment.actionPerformed(e);
		else if(actionCommand.equals("Top Selling Items"))
				top_selling_controller.actionPerformed(e);
	}

	@Override
	public void show() {
		// TODO Auto-generated method stub
		
	}
	
	
}
